package com.yc.controller;


import com.yc.entity.Categorysecord;
import com.yc.mapper.CmapMapper;
import com.yc.service.ICmapService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * InnoDB free: 4096 kB 前端控制器
 * </p>
 *
 * @author ly
 * @since 2022-05-25
 */
@Controller
@RequestMapping("//cmap")
public class CmapController {
    @Resource
    private CmapMapper cmapMapper;

    @Resource
    private ICmapService cmapService;

    @RequestMapping("addCmap")
    @ResponseBody
    public Integer addCmap(Integer ctid, @RequestBody List< Categorysecord > categorysecordList){
        return cmapService.addCmap(ctid,categorysecordList);
    }

    @RequestMapping("deleteByCtid")
    @ResponseBody
    public Integer deleteByCtid(Integer ctid){
        return cmapMapper.deleteByCtid(ctid);
    }
}

